package com.kuqi.service.impl;

import com.kuqi.dao.AccountDao;
import com.kuqi.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @author:kuqi
 * @createTime:2021/10/18 19:55
 * @description:
 */

public class AccountServiceImpl implements AccountService {
    @Autowired
    @Qualifier("accountDao")  //依赖注入
    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void transfer(String outMan, String inMan, int money) {
        accountDao.outMan(outMan, money);
        int i = 3/0;
        accountDao.inMan(inMan,money);
    }
}
